package com.lrs.java.j2se_self.ioReview;
import java.io.*;

public class TestFileWriter {
	public static void main(String[] args){
		FileWriter fw = null; 
		FileReader fr = null;
		int b = 0;
		try {
			fr = new FileReader("C:\\test.java");
			fw = new FileWriter("C:\\test3.java");
			
			while ((b=fr.read())!=-1){
				fw.write(b);
			}
			fr.close();
			fw.close();
		}catch(FileNotFoundException e){
			e.getStackTrace();
			
		}catch(IOException e1){
			e1.getMessage();
		}
		System.out.println("文件复制成功!");
	}
}
